//
//  BWBaseTableViewController.swift
//  weibo
//
//  Created by libowen on 16/5/21.
//  Copyright © 2016年 libowen. All rights reserved.
//

import UIKit
//BWVisitorLoginViewDelegate
class BWBaseTableViewController: UITableViewController {
    var userLogin = BWUserAccountModel.sharedAccountViewModel.userLogin
    lazy var visitorLoginView: BWVisitorLoginView = BWVisitorLoginView()
    override func loadView() {
        if userLogin {
            super.loadView()
        }else {
            self.loadViewVisitorView()
        }
    }
    private func loadViewVisitorView() {
        view = visitorLoginView
//        visitorLoginView.visitorDelegate = self
        visitorLoginView.userWilllogin = {
            print("登录")
            let nav = UINavigationController(rootViewController: BWOAuthViewController())
            self .presentViewController(nav, animated: true, completion: nil)
            
        }
        visitorLoginView.userWiilRegister = {
            print("注册")
        }
    }
    
//    func userWilllogin() {
//        print("登录")
//    }
//    func userWiilRegister() {
//        print("注册")
//    }
}
